<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/oversea.js"></script>
<script language="javascript">
function savefnskusubmit(id)
{
	var fnsku = $("#fnsku"+id).val();
	if(fnsku)
	{
		$.post("/oversea/ajaxbutton", {"op": "savefnsku","id":id,"fnsku":fnsku},
 function(data){
		
	
},"json");
	}
}
</script>
<title>运输计划</title>
<body class="withvernav">
<div class="bodywrapper">
 {{include file='/public/leftmenu.tpl'}}
    <div class="centercontent">
    
       <div class="pageheader notab">
            <h1 class="pagetitle">运输计划</h1>
            <span class="pagedesc"></span>
            <div class="menulist">
        		<ul class="profile_summary">
                        <li class="current"><a href="/oversea/deliveryplanlist">运输计划列表</a></li>
                        
                    </ul>
               </div>
        </div><!--pageheader-->
        	
        <div id="contentwrapper" class="contentwrapper">
        	
        	<div id="basicform" class="subcontent">
					<form class="stdform stdform2"  id="theFrom" enctype="multipart/form-data" method="post" action="/oversea/savepacking">
                     <p>
                        	<label>始发地</label>
                            <span class="field">
                            <select name="starthouse" id="starthouse" class="selection select2_group" style="width:200px;">
                            	 <option value="" >请选择</option>
                               {{foreach from=$overseawarehouse item=li key=key}}
                               		{{if $myseawarehouse}}
                               		  {{if in_array($li.name,$myseawarehouse)}} 
                               			 <option value="{{$li.name}}" {{if $li.name==$starthouseselect}} selected{{/if}} >{{$li.name}}</option>
                                	  {{/if}}
                                    {{else}}
                               			 <option value="{{$li.name}}" {{if $li.name==$starthouseselect}} selected{{/if}}  >{{$li.name}}</option>
                                    {{/if}}
                               {{/foreach}}
                            </select>
                            </span>
                        </p>
                    	 <p>
                        	<label>目的地</label>
                            <span class="field">
                            <select name="endhouse" id="endhouse" class="selection select2_group" style="width:200px;" onChange="getpurchprolist()">
                            	 <option value="" >请选择</option>
                               {{foreach from=$overseawarehouse item=li key=key}}
                               		{{if $myseawarehouse}}
                               		  {{if in_array($li.name,$myseawarehouse)}} 
                               			 <option value="{{$li.name}}" {{if $li.name ==$seawarehouseselect}} selected{{/if}}>{{$li.name}}</option>
                                	  {{/if}}
                                    {{else}}
                               			 <option value="{{$li.name}}" {{if $li.name ==$seawarehouseselect}} selected{{/if}}>{{$li.name}}</option>
                                    {{/if}}
                               {{/foreach}}
                            </select>
                            </span>
                        </p>
                    	<p>
                        	<label>店铺：</label>
                            <span class="field">
                             <select name="shopname" id="shopname"  class="selection select2_group" style="width:200px;" onChange="getpurchprolist()" >
                             <option value="" >请选择</option>
                               {{foreach from=$d_shop item=li key=key}}
                              	 {{if $myshopname}}
                                     {{if in_array($li.name,$myshopname)}} 
                                     <option value="{{$li.name}}" {{if $li.name ==$shopnameselect}} selected{{/if}}>{{$li.name}}</option>
                                     {{/if}}
                                 {{else}}
                                 	  <option value="{{$li.name}}" {{if $li.name ==$shopnameselect}} selected{{/if}}>{{$li.name}}</option>
                                 {{/if}}
                               {{/foreach}}
                            </select></span>
                        </p>
                        
                          <p>
                        	<label>运输方式
</label>
                            <span class="field">
                           <select class="selection" id="transportmode" name="transportmode"  style="width:200px;">
										<option value="">-请选择-</option>
						    	 {{foreach from=$transportmodelist item=li key=key}}
					    			<option value="{{$li}}" {{if $li==$transportationselect}} selected{{/if}}>{{$li}}</option>
					  	     	{{/foreach}}
									</select>


 <span id=showerr></span>
                            </span>
                           
                        </p>
                     
                       
                     
                     
                     
                      <p>
                        	<label>计划承运人
</label>
  <span class="field">
                            <select class="selection" id="carrier" name="carrier">
                <option value="">--请选择--</option>
                
						     	 {{foreach from=$carrierlist item=li key=key}}
					    			
                <option value="{{$li}}" {{if $detail.carrier==$li}} selected{{/if}}>{{$li}}</option>
                
					  	     	{{/foreach}}
					    			
					  	     	
							
              </select>


 <span id=carriershowerr></span>
                            </span>
                           
                        </p>
                     
                     
                     
                     
                    	
                       
                    
                       
                       
                       	<p>
                        	<table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="stdtable">
    <colgroup>
    <col class="con1">
    <col class="con0">
    <col class="con1">
    <col class="con0">
    <col class="con1">
    <col class="con0">
    <col class="con1">
    </colgroup>
    <thead>
      <tr>
        <th class="head0">本次发货数</th>
        <th class="head0">预订数</th>
        <th class="head0">商品编号</th>
        <th class="head1">商品名称</th>
        <th class="head0">申请编号</th>
        <th class="head0">FNSKU</th>
      </tr>
    </thead>
    <tbody>
    {{foreach from=$list item=li key=key}}
      <tr>
       
        
       
        <td>{{$li.shipNums}}
        <input type="hidden" name="competenceID[]" value="{{$li.id}}">
        <input type="hidden" name="realsend[{{$li.id}}][]" value="{{$li.shipNums}}">
        <input type="hidden" name="overseapurchasing[{{$li.id}}][]" value="{{$li.id}}"  />
        </td>
        <td>{{$li.skunum}}</td>
        <td>{{$li.goodsno}}</td>
        <td>{{$li.goods_name}}</td>
        <td>{{$li.demand_number}}</td>
        <td> 
        {{if $shopnameselect}}
        <input type="text" name="fnsku[{{$li.id}}][]" id="fnsku{{$li.id}}" value="{{$li.fnsku}}"   onBlur="savefnskusubmit({{$li.id}})">
        {{/if}}
        </td>
      </tr>
     {{/foreach}}
     
    </tbody>
  </table>
                        </p>
                        
                        
                        <p class="stdformbutton">
                        	<button type="button" class="submit radius2" id="btn" onClick="savepacking()">生成发货计划</button>
                        </p>
                    </form>
					
                    <br />

            </div><!--subcontent-->
            
            <!--subcontent-->
        
        </div><!--contentwrapper-->
        
	</div><!-- centercontent -->
    
    
</div><!--bodywrapper-->

</body>
</html>
